<?php
$team_cat = $teamdata['categoryid'];
$team_aff = $teamdata['affilid'];

echo "<div id=\"menutop\">\n";

echo "<a target=\"_top\" href=\"set_problems.php\" accesskey=t\"p>problems</a>\n";
echo "<a target=\"_top\" href=\"index.php\" accesskey=\"s\">submissions</a>\n";

if ( $nunread_clars > 0 ) {
	echo '<a target="_top" class="new" href="clarifications.php" ' .
		'accesskey="c" id="menu_clarifications">clarifications (' .
		$nunread_clars . " new)</a>\n";
} else {
	echo '<a target="_top" href="clarifications.php" ' .
		"accesskey=\"c\" id=\"menu_clarifications\">clarifications</a>\n";
}

echo "<a target=\"_top\" href=\"scoreboard.php\" accesskey=\"b\">scoreboard</a>\n";

if ( ENABLE_WEBSUBMIT_SERVER ) {

	//if( $cdata['post'] == 0   AND $team_cat == 4)
	//	echo "<a target=\"_top\" href=\"websubmit_post.php\" accesskey=\"u\">submit</a>\n";
	//else
		echo "<a target=\"_top\" href=\"websubmit.php\" accesskey=\"u\">submit</a>\n";
	
		
}

//Este link se muestra solamente a los equipos que pertenecen a postmaraton, se verifica si el usuario corresponde a la categoria post(4)


if($team_cat == 4){
	//mostrar History_post y History_contest solo a los teamas tipo post
echo "<a target=\"_top\" href=\"history_post.php\" accesskey=\"k\">History_post</a>\n";
//echo "<a target=\"_top\" href=\"history_contest.php\" accesskey=\"k\">History_contest</a>\n";
	if( $cdata['post'] == 1 AND 
	( strcmp(now(), $cdata['starttime']) >= 0 && strcmp(now(), $cdata['endtime']) < 0) )
	{
	if( $team_cat == '4' AND $team_aff == 'UTP' )
		echo "<a target=\"_top\" href=\"current_post.php\" accesskey=\"k\">current_post</a>\n";
	}
}

if ( have_logout() ) {
	echo "<a target=\"_top\" href=\"logout.php\" accesskey=\"l\">logout</a>\n";
}

echo "\n</div>\n\n";

putClock();
